<template>
	<view class="content">
		<view class="team" v-for="(item, index) in data" :key="index" @click="jumpOrdr(item.id)">
			<view class="ddd">
				<image :src="item.picture" mode=""></image>
				<text >{{ item.nickname }}</text>
			</view>
			<view class="checkOrdr">
				查看订单&ensp;> 
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			title: 'Hello',
			data: [],
		};
	},
	onLoad() {
		this.getTheTeam();
	},
	methods: {
		 async getTheTeam() {
			const { data, code, msg } = await this.$u.post('api/user/user_team', { uid: uni.getStorageSync('uid') });
			if (code == 0) return uni.$showMsg();
			this.data = data;
		},
		jumpOrdr(i) {
			uni.navigateTo({
				url: '../teamOrdr/teamOrdr?id='+i,
			});
		},
	},
};
</script>

<style lang="scss" scoped>
.content {
	width: 100vw;
	height: 100vh;
	padding: 30rpx;
	overflow: scroll;
	background-color: #1b1b1b;
	.team {
		width: 690rpx;
		height: 110rpx;
		background: #2a2929;
		border-radius: 10rpx;
		background-color: #2a2929;
		color: #ffffff;
		display: flex;
		align-items: center;
		padding: 0 20rpx;
		margin-bottom: 20rpx;
		.ddd{
			display: flex;
			align-items: center;
			flex: 1;
			image {
				width: 80rpx;
				height: 80rpx;
				border-radius: 50%;
				margin-right: 20rpx;
			}
			
			text {
				color: #ffffff;
			}
		}
		
		.checkOrdr{	
			flex: 1;
			display: flex;
			justify-content: flex-end;
			align-items: center;
		}
	}
}
</style>
